package com.antilia.infomaresme.jobs.impl;

import java.io.IOException;
import java.io.InputStream;
import java.util.Locale;

import org.apache.wicket.util.lang.Bytes;
import org.apache.wicket.util.resource.IResourceStream;
import org.apache.wicket.util.resource.ResourceStreamNotFoundException;
import org.apache.wicket.util.time.Time;

public class MyResourceStream implements IResourceStream {

	private static final long serialVersionUID = 1L;

	private Class<?> clazz; 
	private String file;
	
	public MyResourceStream(Class<?> clazz, String file) {
		this.clazz = clazz;
		this.file = file;
	}

	public Time lastModifiedTime() {
		return Time.now();
	}

	public String getContentType() {
		return "text";
	}

	public Bytes length() {
		return null;
	}

	public InputStream getInputStream() throws ResourceStreamNotFoundException {
		return clazz.getResourceAsStream(file);
	}

	public void close() throws IOException {
		
	}

	public Locale getLocale() {
		// TODO Auto-generated method stub
		return null;
	}

	public void setLocale(Locale locale) {
		// TODO Auto-generated method stub

	}

	public String getStyle() {
		// TODO Auto-generated method stub
		return null;
	}

	public void setStyle(String style) {
		// TODO Auto-generated method stub

	}

	public String getVariation() {
		// TODO Auto-generated method stub
		return null;
	}

	public void setVariation(String variation) {
		// TODO Auto-generated method stub

	}

}
